// model/recipe_state.dart
import 'package:casdon/modules/recipe/data/api/recipe_product_api.dart';
import 'package:casdon/modules/recipe/data/model/recipe_ecoprotocol_model.dart';

import 'package:tuya_home_sdk_flutter/tuya_home_sdk_flutter.dart';

class RecipeDispatchState {
  final RecipeEcoprotocol? ecoModel;

  final List<ThingSmartDeviceModel>? devList;
  final int? devIndex;
  final String? recipeId;

  RecipeDispatchState copyWith({
    RecipeEcoprotocol? ecoModel,

    List<ThingSmartDeviceModel>? devList,
    int? devIndex,
    String? recipeId,
  }) {
    return RecipeDispatchState(
      ecoModel: ecoModel ?? this.ecoModel,

      devList: devList ?? this.devList,
      devIndex: devIndex ?? this.devIndex,
      recipeId: recipeId ?? this.recipeId,
    );
  }

  factory RecipeDispatchState.initial() => RecipeDispatchState(
    ecoModel: null,
    devList: null,
    devIndex: null,
    recipeId: null,
  );

  RecipeDispatchState({
    required this.ecoModel,
    required this.devList,
    required this.devIndex,
    required this.recipeId,
  });
}
